package com.probox.common.core.enums;

public enum TraceStatusEnum {
    //自定义
    createOrder("001","创建订单"),
    payOrder("002","支付订单"),
    //快递鸟返回状态编码
    unInformation("0","暂无轨迹信息"),
    collected("1","已揽收"),
    onTheWay("2","在途中"),
    arriveCity("201","到达派件城市"),
    process("202","派件中"),
    putStation("211","已放入快递柜或驿站"),
    sign("3","已签收"),
    normalSign("301","正常签收"),
    errorSign("302","派件异常后最终签收"),
    otherSign("304","代收签收"),
    stationSign("311","快递柜或驿站签收"),
    problem("4","问题件"),
    unDeliverInformation("401","发货无信息"),
    overTimeSign("402","超时未签收"),
    overTimeUpdate("403","超时未更新"),
    rejection("404","拒收(退件)"),
    sendException("405","派件异常"),
    returnSign("406","退货签收"),
    returnUnSign("407","退货未签收"),
    overTimeStation("412","快递柜或驿站超时未取");

    private TraceStatusEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for(TraceStatusEnum oe: TraceStatusEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
                break;
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
}
